package com.wms.controller;

import com.wms.entity.*;
import com.wms.result.Result;
import com.wms.service.*;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/menu")
@Slf4j
@Api(tags = "菜单管理模块")
public class MenuController {
    @Autowired
    private MenuService menuService;

    /**
     * 菜单列表
     * @param name
     * @return
     */
    @GetMapping("/list")
    public Result<List<WmsMenu>> list(String name){
        return Result.success(menuService.findAll(name));
    }
}
